package top.drinyeit.nongmao.view;

import android.content.Context;
import android.util.AttributeSet;

import top.drinyeit.nongmao.R;


public class TagView extends android.support.v7.widget.AppCompatCheckBox {
	
	private boolean mCheckEnable = true;
	Context context;
	public TagView(Context paramContext) {
		super(paramContext);
		init();
	}

	public TagView(Context paramContext, AttributeSet paramAttributeSet) {
		super(paramContext, paramAttributeSet);
		init();
	}

	public TagView(Context paramContext, AttributeSet paramAttributeSet,
                   int paramInt) {
		super(paramContext, paramAttributeSet, 0);
		init();
	}

	private void init() {
		setText("");
		setBackgroundResource(R.drawable.white_text_background2);
		setTextColor(getResources().getColor(R.color.black));
	}

	public void setCheckEnable(boolean paramBoolean) {
		this.mCheckEnable = paramBoolean;
		if (!this.mCheckEnable) {
			super.setChecked(false);
		}
	}

	public void setChecked(boolean paramBoolean) {
		if (this.mCheckEnable) {
			super.setChecked(paramBoolean);
		}
	}
}
